#include<stdio.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<fcntl.h>
#include<unistd.h>

int main(){
    int fd = open("./fifo", O_RDONLY);
    if(fd < 0){
      perror("open\n");
      return 1;
    }

    char buffer[1024] = {0};
    ssize_t s = read(fd, buffer, sizeof(buffer)-1);
    if(s > 0){
      printf("procB received --->%s\n",buffer);
    }
    close(fd);
    return 0;
}
